/**
 * 日志统计DTO
 * 作者：GodMainCode
 * 创建时间：2024-01-17
 * 修改时间：2024-01-17
 * 修改人：GodMainCode
 */

import { ApiProperty } from '@nestjs/swagger';
import { LogType, LogLevel } from '../../../interfaces/log.interface';

export class LogStatsDto {
  @ApiProperty({ description: '总日志数' })
  total: number;

  @ApiProperty({ description: '按类型统计', type: 'object' })
  byType: {
    [key in LogType]: number;
  };

  @ApiProperty({ description: '按级别统计', type: 'object' })
  byLevel: {
    [key in LogLevel]: number;
  };

  @ApiProperty({ description: '今日日志数' })
  today: number;

  @ApiProperty({ description: '本周日志数' })
  thisWeek: number;

  @ApiProperty({ description: '本月日志数' })
  thisMonth: number;

  @ApiProperty({ description: '错误日志数' })
  errors: number;
} 